package com.partvoyage.client.mvp2.view.main;

import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.HasWidgets;
import com.partvoyage.client.mvp2.framework.MVPDisplay;
import com.partvoyage.client.mvp2.framework.MVPPresenter;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.HLayout;

public class MainPresenter extends MVPPresenter<MainPresenter.Display> {

	public interface Display extends MVPDisplay {
		HLayout getMenuContenaire();

		HLayout getInformationGeneralContenaire();

		HLayout getCarteContenaire();

		HLayout getInformationPointContenaire();

		HLayout getTagCloudContenaire();

		HLayout getActionPointContenaire();

//		HLayout getLigneTemporelleContenaire();
	}

	public MainPresenter(final Display display, final HandlerManager eventBus) {
		super(display, eventBus);
		bind();
	}

	public HLayout getMenuContenaire() {
		return display.getMenuContenaire();
	}

	public HLayout getInformationGeneralContenaire() {
		return display.getInformationGeneralContenaire();
	}

	public HLayout getCarteContenaire() {
		return display.getCarteContenaire();
	}

	public HLayout getInformationPointContenaire() {
		return display.getInformationPointContenaire();
	}

	public HLayout getTagCloudContenaire() {
		return display.getTagCloudContenaire();
	}

	public HLayout getActionPointContenaire() {
		return display.getActionPointContenaire();
	}

//	public HLayout getLigneTemporelleContenaire() {
//		return display.getLigneTemporelleContenaire();
//	}

	/**
	 * Lie le bouton send à l'action ....
	 */
	protected void bind() {

	}

	@Override
	public void go(final HasWidgets container) {
		container.clear();
		container.add(display.asWidget());
	}

	public void go(Canvas container) {
		container.clear();
		container.addChild(display.asWidget());
	}

	@Override
	protected void registerHandler() {
		// TODO Auto-generated method stub

	}

}
